package com.godchicken.praise_each_other.cim.server.controller;

import com.godchicken.praise_each_other.cim.server.entity.Result;
import com.godchicken.praise_each_other.cim.server.pojo.User;
import com.godchicken.praise_each_other.cim.server.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.locks.ReentrantLock;

/**
 * com.godchicken.praise_each_other.cim.server.controller
 * 2020/11/13
 *
 * @author: godchicken
 */

@RestController
@RequestMapping("cim/server/user")
public class UserController {

    private final Logger log= LoggerFactory.getLogger(UserController.class);

    @Autowired
    private UserService userService;

    @RequestMapping("/dologin")
    public Result doLogin(@RequestBody User user){
        log.info(user.toString());
        return userService.doLogin(user);
    }

}
